package org.gd.hellojaxb.privat24.ekb.models;

import javax.xml.bind.annotation.*;

@XmlRootElement(name = "r")
@XmlAccessorType(XmlAccessType.NONE)
@XmlType(propOrder = {"item", "userMock"})
public class EKBRequestUserInfoRequest {

    @XmlAttribute(name = "cntr")
    private static final String country = "AB";
    @XmlAttribute(name = "sid")
    private String sessionId;
    @XmlAttribute(name = "key")
    @SuppressWarnings("unused")
    private static final Integer key = 1;
    @XmlAttribute(name = "t")
    @SuppressWarnings("unused")
    private static final String t = "LST";

    @XmlElement(name = "i")
    @SuppressWarnings("unused")
    private EKBRequestUserInfoItem item;

    @XmlElement(name = "o")
    @SuppressWarnings("unused")
    private static final EKBRequestUserMock userMock = new EKBRequestUserMock();

    public EKBRequestUserInfoRequest() {
    }

    public EKBRequestUserInfoRequest(String sid, String ekbId, String userInn, String userPhone) {
        sessionId = sid;
        item = new EKBRequestUserInfoItem(
                ekbId != null ? Long.parseLong(ekbId) : null,
                userInn != null ? Long.parseLong(userInn) : null,
                userPhone);
    }

    public String getCountry() {
        return country;
    }

    public Integer getKey() {
        return key;
    }

    public String getT() {
        return t;
    }

    public EKBRequestUserMock getUserMock() {
        return userMock;
    }

    public String getSessionId() {
        return sessionId;
    }

    public void setSessionId(String sessionId) {
        this.sessionId = sessionId;
    }

    public EKBRequestUserInfoItem getItem() {
        return item;
    }

    public void setItem(EKBRequestUserInfoItem item) {
        this.item = item;
    }
}
